package cn.admin.remoting.serialize.impl;

import cn.admin.remoting.impl.ConnectionRequest;
import cn.admin.remoting.impl.ConnectionResponse;

import java.io.IOException;

public class DeserializeException extends IOException {

    private final ConnectionRequest request;
    private final ConnectionResponse response;

    DeserializeException(IOException ioe,ConnectionRequest request) {
        super(ioe);
        this.response = null;
        this.request = request;
    }

    DeserializeException(IOException ioe,ConnectionResponse response) {
        super(ioe);
        this.response = response;
        this.request = null;
    }

    public ConnectionRequest getRequest() {
        return request;
    }

    public ConnectionResponse getResponse() {
        return response;
    }
}
